package com.beaven.imclient.base;

import com.beaven.imclient.BuildConfig;
import com.beaven.imclient.push.PushService;
import com.beaven.imclient.utils.ToastUtil;
import com.beaven.model.model.base.BaseApplication;
import com.facebook.stetho.Stetho;
import com.igexin.sdk.PushManager;
import timber.log.Timber;

/**
 * author: Beaven
 * time: 2017/5/18 13:34
 */

public class MainApplication extends BaseApplication {

  @Override public void onCreate() {
    super.onCreate();

    // log config
    if (BuildConfig.DEBUG) {
      Timber.plant(new Timber.DebugTree());
    }

    //  init Toast
    ToastUtil.initToast(this);

    // 推送注册
    PushManager.getInstance().initialize(this, PushService.class);

    Stetho.initializeWithDefaults(this);
  }
}
